3.8.40 \(\int \frac {A+B x}{\sqrt {x} \sqrt {a^2+2 a b x+b^2 x^2}} \, dx\)

Optimal. Leaf size=99 \[ \frac {2 (a+b x) (A b-a B) \tan ^{-1}\left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{\sqrt {a} b^{3/2} \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {2 B \sqrt {x} (a+b x)}{b \sqrt {a^2+2 a b x+b^2 x^2}} \]

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 99, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {770, 80, 63, 205} \begin {gather*} \frac {2 (a+b x) (A b-a B) \tan ^{-1}\left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{\sqrt {a} b^{3/2} \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {2 B \sqrt {x} (a+b x)}{b \sqrt {a^2+2 a b x+b^2 x^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*x)/(Sqrt[x]*Sqrt[a^2 + 2*a*b*x + b^2*x^2]),x]

[Out]

(2*B*Sqrt[x]*(a + b*x))/(b*Sqrt[a^2 + 2*a*b*x + b^2*x^2]) + (2*(A*b - a*B)*(a + b*x)*ArcTan[(Sqrt[b]*Sqrt[x])/
Sqrt[a]])/(Sqrt[a]*b^(3/2)*Sqrt[a^2 + 2*a*b*x + b^2*x^2])

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 80

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(b*(c + d*x)
^(n + 1)*(e + f*x)^(p + 1))/(d*f*(n + p + 2)), x] + Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(
d*f*(n + p + 2)), Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2,
0]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 770

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dis
t[(a + b*x + c*x^2)^FracPart[p]/(c^IntPart[p]*(b/2 + c*x)^(2*FracPart[p])), Int[(d + e*x)^m*(f + g*x)*(b/2 + c
*x)^(2*p), x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && EqQ[b^2 - 4*a*c, 0]

Rubi steps

\begin {align*} \int \frac {A+B x}{\sqrt {x} \sqrt {a^2+2 a b x+b^2 x^2}} \, dx &=\frac {\left (a b+b^2 x\right ) \int \frac {A+B x}{\sqrt {x} \left (a b+b^2 x\right )} \, dx}{\sqrt {a^2+2 a b x+b^2 x^2}}\\ &=\frac {2 B \sqrt {x} (a+b x)}{b \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {\left (2 \left (\frac {A b^2}{2}-\frac {a b B}{2}\right ) \left (a b+b^2 x\right )\right ) \int \frac {1}{\sqrt {x} \left (a b+b^2 x\right )} \, dx}{b^2 \sqrt {a^2+2 a b x+b^2 x^2}}\\ &=\frac {2 B \sqrt {x} (a+b x)}{b \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {\left (4 \left (\frac {A b^2}{2}-\frac {a b B}{2}\right ) \left (a b+b^2 x\right )\right ) \operatorname {Subst}\left (\int \frac {1}{a b+b^2 x^2} \, dx,x,\sqrt {x}\right )}{b^2 \sqrt {a^2+2 a b x+b^2 x^2}}\\ &=\frac {2 B \sqrt {x} (a+b x)}{b \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {2 (A b-a B) (a+b x) \tan ^{-1}\left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{\sqrt {a} b^{3/2} \sqrt {a^2+2 a b x+b^2 x^2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 72, normalized size = 0.73 \begin {gather*} \frac {2 (a+b x) \left ((A b-a B) \tan ^{-1}\left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )+\sqrt {a} \sqrt {b} B \sqrt {x}\right )}{\sqrt {a} b^{3/2} \sqrt {(a+b x)^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x)/(Sqrt[x]*Sqrt[a^2 + 2*a*b*x + b^2*x^2]),x]

[Out]

(2*(a + b*x)*(Sqrt[a]*Sqrt[b]*B*Sqrt[x] + (A*b - a*B)*ArcTan[(Sqrt[b]*Sqrt[x])/Sqrt[a]]))/(Sqrt[a]*b^(3/2)*Sqr
t[(a + b*x)^2])

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 6.90, size = 66, normalized size = 0.67 \begin {gather*} \frac {(a+b x) \left (\frac {2 B \sqrt {x}}{b}-\frac {2 (a B-A b) \tan ^{-1}\left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{\sqrt {a} b^{3/2}}\right )}{\sqrt {(a+b x)^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(A + B*x)/(Sqrt[x]*Sqrt[a^2 + 2*a*b*x + b^2*x^2]),x]

[Out]

((a + b*x)*((2*B*Sqrt[x])/b - (2*(-(A*b) + a*B)*ArcTan[(Sqrt[b]*Sqrt[x])/Sqrt[a]])/(Sqrt[a]*b^(3/2))))/Sqrt[(a
 + b*x)^2]

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 102, normalized size = 1.03 \begin {gather*} \left [\frac {2 \, B a b \sqrt {x} + {\left (B a - A b\right )} \sqrt {-a b} \log \left (\frac {b x - a - 2 \, \sqrt {-a b} \sqrt {x}}{b x + a}\right )}{a b^{2}}, \frac {2 \, {\left (B a b \sqrt {x} + {\left (B a - A b\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b}}{b \sqrt {x}}\right )\right )}}{a b^{2}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x^(1/2)/((b*x+a)^2)^(1/2),x, algorithm="fricas")

[Out]

[(2*B*a*b*sqrt(x) + (B*a - A*b)*sqrt(-a*b)*log((b*x - a - 2*sqrt(-a*b)*sqrt(x))/(b*x + a)))/(a*b^2), 2*(B*a*b*
sqrt(x) + (B*a - A*b)*sqrt(a*b)*arctan(sqrt(a*b)/(b*sqrt(x))))/(a*b^2)]

________________________________________________________________________________________

giac [A]  time = 0.16, size = 57, normalized size = 0.58 \begin {gather*} \frac {2 \, B \sqrt {x} \mathrm {sgn}\left (b x + a\right )}{b} - \frac {2 \, {\left (B a \mathrm {sgn}\left (b x + a\right ) - A b \mathrm {sgn}\left (b x + a\right )\right )} \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )}{\sqrt {a b} b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x^(1/2)/((b*x+a)^2)^(1/2),x, algorithm="giac")

[Out]

2*B*sqrt(x)*sgn(b*x + a)/b - 2*(B*a*sgn(b*x + a) - A*b*sgn(b*x + a))*arctan(b*sqrt(x)/sqrt(a*b))/(sqrt(a*b)*b)

________________________________________________________________________________________

maple [A]  time = 0.06, size = 65, normalized size = 0.66 \begin {gather*} \frac {2 \left (b x +a \right ) \left (A b \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )-B a \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )+\sqrt {a b}\, B \sqrt {x}\right )}{\sqrt {\left (b x +a \right )^{2}}\, \sqrt {a b}\, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)/x^(1/2)/((b*x+a)^2)^(1/2),x)

[Out]

2*(b*x+a)*(A*arctan(1/(a*b)^(1/2)*b*x^(1/2))*b+B*x^(1/2)*(a*b)^(1/2)-B*arctan(1/(a*b)^(1/2)*b*x^(1/2))*a)/((b*
x+a)^2)^(1/2)/b/(a*b)^(1/2)

________________________________________________________________________________________

maxima [B]  time = 1.54, size = 140, normalized size = 1.41 \begin {gather*} -\frac {2 \, {\left (B a - A b\right )} \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )}{\sqrt {a b} b} + \frac {{\left ({\left (3 \, B a b - A b^{2}\right )} x^{2} + 3 \, {\left (B a^{2} + A a b\right )} x\right )} \sqrt {x} + \frac {2 \, {\left (A a b x^{2} + 3 \, A a^{2} x\right )}}{\sqrt {x}}}{3 \, {\left (a^{2} b x + a^{3}\right )}} - \frac {{\left (3 \, B a b - A b^{2}\right )} x^{\frac {3}{2}} - 6 \, {\left (B a^{2} - A a b\right )} \sqrt {x}}{3 \, a^{2} b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x^(1/2)/((b*x+a)^2)^(1/2),x, algorithm="maxima")

[Out]

-2*(B*a - A*b)*arctan(b*sqrt(x)/sqrt(a*b))/(sqrt(a*b)*b) + 1/3*(((3*B*a*b - A*b^2)*x^2 + 3*(B*a^2 + A*a*b)*x)*
sqrt(x) + 2*(A*a*b*x^2 + 3*A*a^2*x)/sqrt(x))/(a^2*b*x + a^3) - 1/3*((3*B*a*b - A*b^2)*x^(3/2) - 6*(B*a^2 - A*a
*b)*sqrt(x))/(a^2*b)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {A+B\,x}{\sqrt {x}\,\sqrt {{\left (a+b\,x\right )}^2}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x)/(x^(1/2)*((a + b*x)^2)^(1/2)),x)

[Out]

int((A + B*x)/(x^(1/2)*((a + b*x)^2)^(1/2)), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {A + B x}{\sqrt {x} \sqrt {\left (a + b x\right )^{2}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x**(1/2)/((b*x+a)**2)**(1/2),x)

[Out]

Integral((A + B*x)/(sqrt(x)*sqrt((a + b*x)**2)), x)

________________________________________________________________________________________